Technology Tales

Adventures & experiences in contemporary technology

Running cron jobs using the www-data system account

22nd December 2018

When you set up your own web server or use a private server (virtual or physical), you will find that web servers run using the www-data account. That means that website files need to be accessible to that system account if not owned by it. The latter is mandatory if you you want WordPress to be able to update itself with needing FTP details.

It also means that you probably need scheduled jobs to be executed using the privileges possess by the www-data account. For instance, I use WP-CLI to automate spam removal and updates to plugins, themes and WordPress itself. Spam removal can be done without the www-data account but the updates need file access and cannot be completed without this. Therefore, I got interested in setting up cron jobs to run under that account and the following command helps to address this:

sudo -u www-data crontab -e

For that to work, your own account needs to be listed in /etc/sudoers or be assigned to the sudo group in /etc/group. If it is either of those, then entering your own password will open the cron file for www-data and it can be edited as for any other account. Closing and saving the session will update cron with the new job details.

In fact, the same approach can be taken for a variety of commands where files only can be access using www-data. This includes copying, pasting and deleting files as well as executing WP-CLI commands. The latter issues a striking message if you run a command using the root account, a pervasive temptation given what it allows. Any alternative to the latter has to be better from a security standpoint.

Photography Kit

7th July 2008

Photography Kit

This is a list that I want to build up over time and I am going to limit it to the U.K. for now. As should be apparent from any commentary that I have included, I have dealt with a few of the retailers that are listed below so I hope that it comes in useful.

7dayshop.com

My biggest purchase from this Guernsey-based lot was a Canon EOS 10D body that heralded the start of my journey into the world of digital photography at the beginning of 2005. There was a time when I was wont to buy film from them too, along with other bits and pieces but I then turned to Mailshots in Stoke-on-Trent for similar pricing and quicker delivery; it often took weeks for things to arrive from Guernsey after purchase.

Ace Optics

Cameraworld

Ffordes

Prior to my entry into the world of digital photography, this lot became a port of call for several pre-owned film cameras. A Minolta X-700 came from there in 2002 as did compatible Sigma lenses and a flash gun. During 2004, I traded in my Canon EOS 300 for an EOS 30 that they had on sale and an EOS 50E was acquired as a second body. A piece of fooling resulting from a lapse of concentration while on a visit to Harris in August has meant that the 50E has been pressed into service as my main film camera on any outings; it’s always good to have a spare and prices these days are more tempting than when I was buying second-hand equipment.

Jessops

This is a name in photographic retailing that has been brought back from the dead. Before its collapse, it was the major retailer in Britain’s town centres and there was a branch in Macclesfield. However, the focus is more on online sales now with there only being a small network of city centre stores like the one on Market Street in Manchester. Having Jessops back is no bad thing and I wish them well for it was at a branch in Stockport that I bought my first-ever SLR, a Canon EOS 300, in July 2001. Purchases of Sigma lenses followed: a 70-300 mm one in Stockport and a 28-135 mm in Manchester. Admittedly, the latter of these saw more use than the former, but that always happens to me: I seem to be a one body, one lens man most of the time and it is only the prospect of a lost in quality that seems to keep me away from using super-zoom lenses.

London Camera Exchange

Mifsuds

Park Cameras

It seems to have been Sigma lenses for my Pentax DSLR’s that I have been buying from these people. The first was an 18-125 mm offering that is the main one that I use and next came a 50-200 mm one that extends my photographic range further into the telephoto region. That I made the second purchase from them may surprise some given that there was a lengthy wait for the first one but I may have asked for a less common item and I allowed for this. The 50-200 mm lens was a far more timely arrival and there may be more purchases from them yet, subject to my actually having a need to do so.

Picstop

A card reader and SD cards have been what makes up the custom that I have given this bunch. Delivery from the Isle of Man is quicker than from Jersey but you do incur additional charges even if you get that for which you are paying.

SRS Microsystems

Wex Photo Video

Formerly known as Warehouse Express, this operation has occasionally tempted me with promising goods at appealing prices. In the early days, a Sekonic light meter came from them but they now are a first port of call when pondering the prospect of a photographic purchase. Various cameras, lenses, filters and bags have been sourced there over the years.

Snippets

15th September 2012

There are times when I feel the need to share some snippets with a longer lifespan than a tweet. This is a place for those and some yet may even turn into longer articles themselves. That already has happened for one of them, so there is something of a digital scrapbook in operation here.

13:08 January 8, 2024

Now that ownCloud has been acquired by Kiteworks, there is some uncertainty about what happens next. So far, there is an offer for ownCloud and Nextcloud users to move to Kiteworks’ proprietary platform. Nextcloud itself has been busy making use of the uncertainty to promote their own product line.

19:15 November 19, 2023

The open-source section of the website got a lot of tweaking in the last few weeks. The recipient of the attention was the operating system subsection. That got a full reorganisation with all the listings seeing new entries too. The desktop software also got a bit of attention, and other areas could get altered yet.

11:35 January 20, 2023

Recently, I have been having trouble with Nvidia drivers following a kernel update in Linux Mint (21.1 is the version that I am using). The kernel version has been rolled back from 5.19.x to 5.15.x, and I installed an old AMD graphics card as well. Things still are not perfect, though, so I will be looking out for a way to make things smoother. For now, all is good enough for the moment.

14:28 July 1, 2022

Here are some web apps for video recording for work purposes:

Loom

CloudApp

10:30 February 12, 2022

Google Analytics appears to be losing favour in the EU, if Matomo is to be believed. First, Austria outlawed its usage and no France follows suit. This naturally suits Matomo, a self-hosted open-source alternative for collecting website metrics, so it should not be any surprise that they are forthcoming with these details.

16:20 October 9, 2021

Here is the sequence of commands to use when upgrading from OpenMediaVault 4.x to 5.x. All need to be executed with elevated access privileges:

wget -O - https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/upgrade4to5 | sudo bash

reboot

Once your system has restarted and you have logged in again, then you execute these:

apt-get purge openmediavault-omvextrasorg resolvconf

wget -O - https://github.com/OpenMediaVault-Plugin-Developers/packages/raw/master/install | bash

apt-get update

apt-get dist-upgrade

omv-salt deploy run nginx

omv-salt deploy run phpfpm

apt-get install usrmerge

omv-confdbadm migrate conf 5.0.0

15:19 October 9, 2021

Here are some North American online emporia fro buying computers, their components or peripherals:

Best Buy

Micro Center

Newegg

PC-Canada

Tech-America

09:06 September 24, 2021

Here are boilerplate commands for banning and unbanning IP addresses using Fail2ban:

fail2ban-client set <JAIL> banip <IP>
fail2ban-client set <JAIL> unbanip <IP>

13:09 July 27, 2020

If you ever need to install Linux kernel headers on an openSUSE instance in order to install VirtualBox Guest Additions, the following command should be executed in order to do the needful:

sudo zypper in kernel-source

10:37 February 5, 2017

Here is a possible way of resetting the CSS definition for a HTML element, class or ID:

#reset-this-parent {
all: initial;
* {
all: unset;
}
}

Browser support for the above may vary though.

10:39 November 23, 2016

After seeing messages like “The authenticity of host ‘hostname’ can’t be established” during ssh connections, I decided to investigate more and came up with the following solution:

sudo chown -v $USER ~/.ssh/known_hosts

My known_hosts file had gained root ownership so i could not write to it so changing the ownership to that of my own user account sorted the problem. An alternative could be to change the group assignment using chgrp and setting permissions using chmod but what I did sufficed for my needs.

06:30 November 23, 2016

When I ran into trouble with accessing my own websites using my broadband, I found that the solution was to change DNS Lookup Service to what Google offers. This was done on the router side and the IP addresses used were 8.8.8.8 and 8.8.8.4.

22:33 June 4, 2016

Here’s a way to convert DNG files to JPEG ones:

find -type f | grep DNG | parallel mogrify -format jpg {}

10:51 September 16, 2015

Here is a way to recursively delete folders and their contents in PowerShell:

Remove-Item .\foldertodelete -Force -Recurse

The Force switch silences any messages that otherwise would appear and the Recurse switch is what gets directories removed.

23:38 August 18, 2015

Thomson Reuters is changing over Open Calais at the end of August.

11:05 July 29, 2015

Motorola now selling phones direct to the public through its own store. Customisation options are available for more expensive models like Moto X and Nexus 6 too.

10:18 April 12, 2015

Devuan (pronounced like dev-one) is a fork of Debian that does not use systemd as Debian, like so many other distros, is doing. Part of the name must come from a collective calling itself Veteran UNIX Admin (VUA). There is no actual release just but one is intended for around the same time as Debian 8.0 gets released and donations are being solicted via the website.

18:51 February 20, 2015

Here is a handy way to get PowerShell to show files larger than a certain size:

get-childitem | where-object {$_.length -gt 10000}
|ft fullname, length -auto

19:40 December 1, 2014

When a VirtualBox upgrade broke the networking on a Windows 8.1, it was time to look at System Restore to see what it would do. It reverted version 4.3.20 to 4.3.15 and the network disconnection stopped. For now, I will remain with that older version after the misstep with the latest one. Sometimes it is best to stick with what is known to work.

20:38 October 30, 2014

With my deciding to try doing about my waistline during the summer (a bike got put on a trainer and around 30 minutes is spent on it most evenings while I also catch up some reading; now, I feel fitter and incursions into the countryside have an added air of confidence about them), an interest in fitness monitors has developed and the Pulse Ox from Withings has taken my eye due its being price of around £100. That makes it less than alternatives and it isn’t the only health gadget that the company does either with there being a blood pressure monitor in its range too. The Pulse Ox monitors such things as heart rate, activity such as walking and running, sleeping and weight too. It should work with your smartphone as well, which is a bonus. It is one of several like it with Samsung and Apple going in for phone apps and Microsoft releasing their Band device as well. This appears to be a growing area where I never expected to see mainstream technology companies having a role for themselves.

12:44 October 30, 2014

Ergotech now have useful desktop stands for tablet computers. There is one for a full size iPad and another for any other type of tablet. A standalone one on wheels also is available though I cannot see myself ever needing such an item.

20:24 October 20, 2014

Here are some more specialist information sources with search facilities:

Infoplease

ScienceDirect

18:53 October 7, 2014

Here is the test for the “Shellshock” vulnerability in the bash shell:

env x='() { :;}; echo vulnerable’ bash -c “echo this is a test”

It should not return the following:

vulnerable
this is a test

This would be acceptable:

bash: warning: x: ignoring function definition attempt
bash: error importing function definition for `x’
this is a test

Also, just having this might be fine too:

this is a test

In case you need it, Redhat has more information on the bug that caused scare stories everywhere. Now, it is over to system administrators everywhere to do their bit now that bash has been patched.

21:36 August 24, 2014

Sometimes you need to create more than one directory level in a hierarchy at once and mkdir has the -p option for this purpose. That gets it to create any missing levels in a folder path and avoids warnings that would be issued otherwise.

16:18 August 21, 2014

Debian 8 is under development and has its first beta ready for download. XFCE is now the default desktop environment though it remains possible to install GNOME and GNOME Shell too. In fact, I successfully have given that a go in a VirtualBox installation and will keeping an eye on development so long as no system meltdowns occur. The version of the X Window system already is incompatible with VirtualBox 4.3.14 so we need to await a new version of the virtualisation software before we get access to advanced functions like full window desktop expansion. What we have at the moment works well enough to keep eye on development so we can wait for that full support.

18:31 August 6, 2014

Perfect Resize from onOne Software caught my eye for scaling up images after seeing it mentioned in a Outdoor Photography review of Avanquest PhotoZoom Professional. With a library of 6″ x 4″ prints, I am limited in how large I can make scanned images without they looking blurred and pixelated so that’s why my interest was aroused. There may be a free moment spent seeing what it might do in that situation yet.

16:24 August 2, 2014

Nvidia has a useful page on the difference between DVI-D and DVI-I. It came in handy when transitioning from VGA to DVI on my home PC’s. That made what appears on my Iiyama screen much sharper and allowed me to rid myself of a suspect VGA cable too.

21:42 June 11, 2014

Here are some interesting articles about EFI and UEFI that I uncovered during a recent episode of setting up dual booting of Windows 8.1 and Linux Mint 17 on a PC with EFI:

UEFI

UEFI Dual-Boot -- Ubuntu 12.04.3 + Windows 8.1 (One GPT HDD)

Managing EFI Boot Loaders for Linux

The rEFInd Boot Manager: Getting rEFInd

11:53 May 3, 2014

In the U.K., BT allows you to divert your phone calls for a fee and I have made good use of it over the past year. The service is called Call Diversion and Eircom, Ireland’s counterpart to BT, offers Call Forwarding in Éire. Both are handy because redirecting a call to a mobile phone means that you know you are not missing any calls and that there is nothing lurking on an answering machine when you do get to your home or office. Landline telephony may seem less exciting these days than other forms of communication yet it still has its place and I would not get any nasty surprises along the path of life either. If only I had started doing this kind of thing earlier than I did…

20:12 April 4, 2014

Here’s a useful article about the ever useful locate command. Whether it is FreeBSD or Ubuntu that you are running, this article has a use and that especially when the locate database needs updating with the updatedb command.

20:54 March 12, 2014

A recent website redesign was well helped by modern.IE‘s collection of virtual machine appliances containing different versions of Windows and Internet Explorer. Depending on the host operating system that you are using, you have different options. For Linux, it is VirtualBox only while Windows gains VMware and Virtual PC too. It is a matter of just picking out what suits your situation from dropdown lists.

The first one that I picked was Vista with IE 7 and it was an interface that I had not seen for a while. For all the criticism, the operating system did work well though I wonder if it arrived before the computer hardware that it really needed in order to run smoothly. The dark theme cannot have helped its cause either, especially when compared with the much brighter Windows 7 or Windows 8.x. A Windows XP appliance with IE 6 was grabbed before it gets yanked and support for the elderly OS does finish in April. IE 6 probably is on its last legs so I probably can ignore it now but IE 7 might live longer yet. Window 7 appliances with IE 9 and IE 10 also were downloaded and confirmed that all was well in recent versions of IE when it came to the website. The Vista virtual machine allowed me to ensure that all looks acceptable on IE 7 too. The VM’s themselves contain evaluation versions of enterprise variants of Windows and have a limited lifespan though it is little trouble to reimport an appliance again to rest the clock if so required. In most cases, you extend the evaluation periods too through re-arming and there only are so many times that you can do that anyway. With Windows 8.x, it isn’t even a possibility anyway.

22:05 March 9, 2014

Today, I found an interesting article on CSS media queries and put it to some use for a website redesign that has been keeping me busy over the weekend. Twitter’s Bootstrap came in handy for this too. Now, it’s on to ridding the new design of any rough edges that remain in there. That can be an ongoing task and the site is here if you fancy a look to see what my efforts have produced.

16:20 February 26, 2014

Adding a new Zalman ZM450-GS power supply did little to sort the buzzing in my speakers but it has made the PC where it was installed so much quieter; a much larger fan spinning slower helps while still moving the required amount of air. It is 450W too and I am wondering if my main PC would benefit from a similar upgrade. That may be quieter than the other one was but the case was not a deluxe model so the change should do no harm. As for the speakers, moving them was the only way to get rid of the buzzing. Looking back on this now, it seems that one of them was far too close to a PC.

20:33 February 15, 2014

Currently, the spare PC appears to be causing buzzing on my main PC speakers and with my landline telephone when it is placed right under these.  Removing it helps to cut it down but I fancy having a better fix and am wondering if a new power supply might help. Also, I am wondering if there are other sources too. In the meantime, I would like to share an article on the subject that I recently found: Kill Studio Hum and Buzz at the Source.

22:14 February 12, 2014

Applying latest set of updates to LMDE worked to get to Update 8 worked smoothly unlike some predecessors. This brought the latest version of Cinnamon so GNOME now is redundant. It will be interesting to see where things go next.

16:24 February 8, 2014

During the week, I discovered that Twitter is not a benign place to go ruminating. A sharp riposte in an unnecessary tone of voice was enough to bring on a sense of extra caution. Wherever you get humanity, you are likely to encounter and one had a go at me so some thoughts are going to be kept away from there from this point forward. Sometimes, you own website is a far better place to go ponder happenings in the world around you. After all, an ugly comment can be deleted and a rogue IP address blocked if things need to go that far. Of course. more civility would be best. Polite correction is the best course whenever it is warranted since we all are human and no one is beyond making mistakes.

16:15 February 8, 2014

On my outdoors website, I have been using a PHP script from Detect Mobile Browsers but this does not distinguish between Android running on a tablet and that running on a phone. Therefore, I have turned to another source of such scripting and that is working better so far. In fact, this offers more than just PHP but also Python, JavaScript and other scripting languages along with configuration files for web servers too. Apache, Nginx and IIS all have something for them. The logic essentially is based on Perl regular expression matching of user agent strings, not an infallible means but good enough for me along with a smattering of responsive design.

14:30 February 1, 2014

For anyone lost when faced with the changes Microsoft brought in with the launch of Windows 8 and largely retained in Windows 8.1, TechRadar has a useful article: 62 Windows 8 tips, tricks and secrets. What will prove especially interesting is where Microsoft goes next when many of their customers prefer the Windows 7 interface and are sticking with the elderly Windows XP. You only can get so far by telling your customers that they are wrong all of the time and the is competition in the form of Apple’s OS X and Google’s Chrome now.

14:23 February 1, 2014

TechRadar has a round-up of Best free photo editing software: 10 top image editors you should try. Usual options like GIMP, Paint.Net and IrfanView get a mention along with other less well known ones. Interestingly, Google’s Picasa is excluded from the list but that might be because it largely is an image file management tool even if it has some image editing capabilities too.

21:28 January 27, 2014

Late last week, I found out about the image file sorting tool PhotoSift via an article on the software. It looks interesting though I have yet to try it.

17:52 January 27, 2014

Here are some interesting reviews from TechRadar:

Best compact system camera 2014: the top models reviewed

Best tripod and camera support: 13 tested

Best tripod head: 8 reviewed

The tripod heads review really caught my eye more than the others. After all, 2013 was the year that I got a CSC and a Manfrotto tripod has sat reproachingly in the corner far more often than it should.

19:41 January 16, 2014

Today, I spotted two interesting articles to which I want to retain links on here:

Managing the future of complex business and IT landscapes

Send large files to clients with these 8 free tools

Both of these ring bells for me for different reasons. The first is a reminder of a slow and painful system project with which I was involved and of an ineffective IT support service that pained us at the time. The second is ever present in my current job with its need to send data and output files to clients as well as receiving specifications from them.

19:36 January 4, 2014

In recent weeks, I have been having trouble with the onboard network controller on a spare PC that I have at home. It connects to the network fine for a few minutes and then struggles. Making use of an old PCI ethernet card that I had from another machine solved the problem. Does anyone know of issues with ASRock motherboards and onboard network ports at all? It isn’t something that I have seen before and this motherboard never had good networking capability as long as I have had it.

19:33 January 4, 2014

After Christmas, I took delivery of an HTC One mini mobile phone that I got free as part of a contract renewal with O2. It also is known as the M4 and I have been getting used to it since I got it. A lot is familiar and there are some little differences too. Some of these leave me asking why what worked well before got changed to something that is less smooth. Of course, that can be the course of things and it applies to buying a new car as much as getting a phone upgrade. All in all, the phone works well and battery life appears much improved over the HTC Desire S so far, never a bad thing to notice.

19:25 January 4, 2014

This morning, the hosting provider for this website had an outage that lasted over three hours. The provider was Fasthosts and the cause was a power failure. They usually are good so this thankfully does not happen too often. However, we have been getting a lot of stormy weather crossing Britain and Ireland this winter so I suspect that there should be little in the way of surprise when something like this happens. Weather is not due to settle during this month so there may be more power failures, hopefully elsewhere, before things settle down again.

17:20 January 3, 2014

On one WordPress website that I have, the refresh rate for RSS widgets wasn’t the quickest and the remedy was to add this line into the themes functions.php file:

add_filter( ‘wp_feed_cache_transient_lifetime’, create_function(‘$a’, ‘return 600;’) );

It creates a custom function that is attached to the widget and the refresh time is set to 600 seconds or 10 minutes. So far, this seems to be doing what I needed.

17:56 December 19, 2013

What I didn’t realise is that TRIM currently is not enabled in Ubuntu by default. That is set to change in Ubuntu 14.04 and here is some advice on the matter until then.

20:41 December 14, 2013

This weekend, I had visions of needing a new hard drive when all files on one in my main home PC (runs Ubuntu GNOME 13.10 64-bit) went read only. The cure was to re-seat the SATA cables and all was well again. Sometimes, inexpensive remedies are best and I need not to forget this one.

20:54 October 29, 2013

Here are two interesting articles that I spotted: the first is on new features in GNOME 3.10  and the second about getting DRM-protected Flash media playing on Ubuntu 13.10. For now, I am sticking with Ubuntu GNOME 13.04 in spite of a pop-up dialogue encouraging an upgrade to 13.10; the potential for even a little disruption is something that I am delaying for now.

20:34 October 16, 2013

While editing a file in Nano on an virtual Arch Linux web server that I have, I noticed that a file had DOS newline characters instead of UNIX ones so conversion using the dos2unix command was in order. There is more on this to be found on nixCraft and there are other options such as sed described in there too.

21:51 September 7, 2013

Following a look at Webmin, I have to say that it seems a worthy tool for remote management of servers. My trial so far has been on my Ubuntu virtual web server and it works on port 10000 without interfering with the operation of the actual web server. Being able to run system updates and deletion of MySQL databases without resorting to the command will seem a bonus for some. There’s more to it than these though and I have seen the possibility of managing virtual servers located within a real being mooted. It was an issue of Linux User & Developer than inspired me so my Linux magazine reading is seeing its uses.

20:30 September 4, 2013

Here are some interesting articles for anyone thinking about software development and its realities:

The care and feeding of software engineers (or, why engineers are grumpy)

Being an introvert as I am, this article really is something to which I can relate. Whenever I cannot get the space for undisturbed work, it takes from how I enjoy my job.

How designers and engineers can play nice (and still run with scissors)

We all have to work cross-functionally so you cannot have it all your own way…

Six reasons why the NHS National Programme for IT failed

Having been involved in system design, development and implementation myself, I have something to share that fits into the same topic area. Too many cooks can spoil a broth.

Queensland Government Bans IBM from IT Contracts

My past experiences of IBM have not been good and it wasn’t just where I worked either so this is not exactly a surprise. Service organisations need to ensure that they are sufficient responsive and flexible with empowered and enthusiastic staff who do the needful.

23:09 August 11, 2013

Vagrant and Puppet look like very interesting tools for working with virtual machines. They work with VirtualBox or VMware’s Fusion and Workstation so there’s a choice of virtualisation tool.

20:52 April 18, 2013

Crash reports have been appearing after logging into an Ubuntu session for /usr/share/hplip/config_usb_printer.py and it repeating has been reinstalling HPLIP software for my HP LaserJet 1018 printer too. Leaving the printer off until I need it would be one solution and saves some electricity too but it is best to try to sort an issue when you keep getting it. The first step was to download the latest HP software and install it. That wasn’t a complete solution so I altered the latest send_message function call in /usr/share/hplip/config_usb_printer.py from the following:

send_message( device_uri, printer_name, EVENT_DIAGNOSE_PRINTQUEUE, username, 0,”)

to:

send_message( device_uri, printer_name, EVENT_DIAGNOSE_PRINTQUEUE, ”, 0,”)

So far that alteration appears to have addressed the problem but I’ll be keeping an eye on things anyway. If you’re wondering, the inspiration came from a bug discussion on Launchpad and it was the queue clearing section of the Python script that I went and edited.

20:40 April 16, 2013

Recently, I have been having bother with WordPress Jetpack comment form submission. This was caused by the Bad Behaviour plugin and allowing cross site form submission sorted the problem. The setting to change is in Settings > Bad Behaviour on the Dashboard.

17:31 March 16, 2013

Here’s a quick way to make Faenza and Faience icons available to Ubuntu and maybe Linux Mint too:

sudo add-apt-repository ppa:tiheum/equinox
sudo apt-get update && sudo apt-get install faenza-icon-theme faience-*

20:53 February 19, 2013

During a look at a Fedora 18 Live DVD, I found a user name was needed to get to the desktop and root did the trick for me. What I didn’t notice was an install to hard drive option for the GNOME variant that I tried. Maybe it was hidden on the desktop and not displayed. If so, it looks like an oversight.

16:02 February 14, 2013

Here’s the way to find the version of PROC CDISC that came with the version of SAS that you are using:

proc cdisc version;
run;

14:00 February 14, 2013

Here’s robustness principal for software design that otherwise is known as Postel’s Law after TCP pioneer Jon Postel:

Be conservative in what you do, be liberal in what you accept from others

08:10 February 14, 2013

Here’s a command for removal of orphaned packages in Arch Linux and its derivatives (CinnArch and ArchBang come to mind but there may be others):

sudo pacman -Rns $(pacman -Qqtd)

15:11 January 26, 2013

Cinnarch looks very interesting. It’s based on Arch Linux so it’s a rolling distro but has Cinnamon as its desktop environment. Currently, it’s still in beta but I am tempted to give it a go in a virtual machine.

20:55 December 15, 2012

Having decided that my ever sluggish system needed a fresh operating system installation, I set to trying to get on Linux Mint 14. However, not remembering that the disk and not the partition needs specifying for GRUB installation cost me some time. Later, adding on GNOME Shell resulted in a system conflict between MDM and GDM so I now am running Ubuntu GNOME Remix instead. All feels fresher so far though a spot bother was had with the lock screen that caused me to turn off the feature. VMware Player installed without any of the trickery needed to get in its forbear and runs without a hitch so far too. Other bits and pieces need instating yet but the basis of a refreshed computing platform is in place now.

20:56 November 19, 2012

A look at Linux Mint 14 64-bit release candidate in a VirtualBox virtual machine confronted me with irritating mouse pointer behaviour. The pointer constantly darts to the left when you need it not to do that and it seriously affects usability. The final version will be awaited to see if there is an improvement because it’s not very usable as things stand. GNOME Shell can be installed in working order after a spot of fiddling. Installing the software from the Software Store doesn’t add gnome-session as well so the command line alternative remains best:

sudo apt-get install gnome-shell && sudo apt-get install gnome-session

These two really need packaging together as dependencies. Cinnamon is looking as nice as ever and in need of a plug-in that makes virtual desktops behave as they do in GNOME, even if that’s a minority interest now.

12:07 September 30, 2012

Here are commands for adding Cinnamon to Ubuntu:

sudo add-apt-repository ppa:gwendal-lebihan-dev/cinnamon-stable
sudo apt-get update
sudo apt-get install cinnamon

14:39 September 29, 2012

Had a look at GNOME 3.6 in Ubuntu GNOME Remix 12.10 Beta 1 release. Not all extensions are supported yet but GNOME 3.6 only launched officially yesterday anyway. Will take a little while for those extension developers to catch up with it. No hurry in moving from GNOME 3.4 until they do so.

20:24 September 22, 2012

Picked up Netgear ethernet switcher at PC World today. Working without a hitch so far. Some network reorganisation may follow suit.

20:14 September 22, 2012

Initially, I needed to use the command “modprobe vboxdrv” to get VirtualBox going on Sabayon 10. However, there seems to be a better remedy: adding the line ‘modules=”vboxdrv vboxnetflt vboxnetadp”‘ (removing the outer single quotes, by the way) to /etc/conf.d/modules and restarting the system. That seems to have done the trick though I wonder it wasn’t added for me automatically.

13:08 September 22, 2012

Until recently, I hadn’t realised that most if not all SSD’s come in 2.5″ form factor. An extra bracket is needed for installing into 3.5″ drive bays. While tempting, this remains a nice to have upgrade for me.

20:02 September 21, 2012

Found out why my proftpd daemon wasn’t working on Linux Mint. Needed to set it as standalone and not inetd operation. It’s the ServerType setting in /etc/proftpd/proftpd.conf.

21:53 September 18, 2012

Given the site a new appearance. The cause was getting microblogging going on this page. Clashes with zeeDisplay theme and Twitter Tools made for replacements that now power what you see here. Jetpack plugin added too. All looking good to my eyes so far. More tinkering may happen yet.

21:36 September 15, 2012

Here are a few places where you will find Linux version information stored: /etc/issue, /etc/issue.net, /etc/lsb-release.

17:30 September 15, 2012

Desktop swapping can be done in Ubuntu and here’s the command for Xubuntu:

sudo apt-get install xubuntu-desktop

17:22 September 15, 2012

Here’s a set of commands that I once used to get GNOME Shell going for a Sabayon 9 installation in a VirtualBox virtual machine:

su
equo install --ask linux-sources
cd /run/media/john/VBOXADDITIONS_4.1.16_78094
./VBoxLinuxAdditions.run
mv /usr/libexec/gnome-session-check-accelerated-helper /usr/libexec/gnome-session-check-accelerated-helper.bak
ln -s /bin/true /usr/libexec/gnome-session-check-accelerated-helper

Hope they have a use though VirtualBox has gone through a few versions since I discovered that these had the desired effect though the login screen behaved a little oddly. Otherwise, everything worked as it should.

14:16 September 15, 2012

Pondering purchase of NAS. QNAP TS-412 looking promising but need to think about my home networking set up first. Might need an ethernet switch but plan to look into it more first, especially with uplink capability needed.

14:11 September 15, 2012

Appearance of Sabayon 10 caused a bit of disturbance to my Sabayon installation that needed installation from a DVD to resolve. Tried GRUB repairs before the non-loading of an Nvidia kernel module caused bother. Went for old fashioned approach for sake of saving a little troubleshooting time.

13:52 September 15, 2012

This has been added using the Live Blogging plugin and it’s good for pages too, unlike Automattic’s own Liveblog plugin. Maybe they’ll add that sort of functionality in time.

Interrogating Solaris hardware for installed CPU and memory resources

2nd October 2008

There are times when working with a Solaris server that you need to know a little more about the hardware configuration. Knowing how much memory that you have and how many processors there are can be very useful to know if you are not to hog such resources.

The command for revealing how much memory has been installed is:

prtconf -v

Since memory is often allocated to individual CPU’s, then knowing how many are on the system is a must. This command will give you the bare number:

psrinfo -p

The following variant provides the full detail that you see below it:

psrinfo -v

Output:

Status of virtual processor 0 as of: 10/06/2008 16:47:54
  on-line since 09/13/2008 14:47:52.
  The sparcv9 processor operates at 1503 MHz,
        and has a sparcv9 floating point processor.
Status of virtual processor 1 as of: 10/06/2008 16:47:54
  on-line since 09/13/2008 14:47:49.
  The sparcv9 processor operates at 1503 MHz,
        and has a sparcv9 floating point processor. 

For a level intermediate between both extremes, try this to get what you see below it:

psrinfo -vp

Output:

The physical processor has 1 virtual processor (0)
  UltraSPARC-IIIi (portid 0 impl 0x16 ver 0x34 clock 1503 MHz)
The physical processor has 1 virtual processor (1)
  UltraSPARC-IIIi (portid 1 impl 0x16 ver 0x34 clock 1503 MHz)

Mobile Phones

7th November 2010

Mobile Phones

For a long time, I wasn’t that interested in mobile telephony but a switch of job in 2010 meant that having access to the web from a mobile became desirable so I started doing that with a long relinquished BlackBerry Curve 8520; now it is Motorola hardware that I mainly use for the same kind of thing. The increased interest in mobile telephony has borne fruit in the list that you find here. The world of 3G and the devices that use it produced a learning curve for me and the availability of 5G is growing now too.

One thing that you’ll see from many a high street in the U.K. is the profusion of shops operated by mobile phone network operators and it is the same in Éire (the indigenous operator Eir has impressed me over there). These networks sell you their wares online too and that is why they are listed in their own section at the bottom. Before their listing, I have collected whatever retailers there are that are not attached to any network and there didn’t seem to be that many of them when I set up the list but it’s grown a good bit since then due to my perusing the occasional mobile phone magazine. If I find any more of these, I’ll add them on here.

Independent Retailers

Carphone Warehouse

These are the people with whom I have had the most dealings since I got my first ever mobile phone from them, a Motorola that I kept using until it battery kept losing its charge quickly on me. More recently, I picked up a Nokia 1661 from them that needed a look at the manual to get its call volume set properly.

buymobiles.net

If these didn’t sponsor the Buyer’s Guide in Smartphone Essentials magazine, I never would have heard of them; Derby County FC supporters should have seen their logo on the player’s shirts but I cannot say that I am a football fan. A look at the website confirms the presence of a comprehensive selection of phones for sale, contracted or otherwise.

Clove Technology

Compared to the others, this outlet is unusual in offering only phones without contracts or pay-as-you-go arrangements. In other words, it is a place for someone running the gauntlet of the cost of going for a SIM-free phone. Saying that, they have their place and many tariffs are puffed up to pay for the more expensive device that is provided to you as part of the contract; that’s why you are tied in for a certain length of time too, so as ensure that the cost of the phone is recovered.

AffordableMobiles.co.uk

The name may be new to me but its Derbyshire based parent company has been involved in mobile phone reselling for more than a decade. The range that the website supplies includes not controlled contracted and pay as you go phones but also SIM cards and phones without SIM cards. That makes it worth a look along with others like it.

Networks

3

Haven’t had much to do with these people apart from poking around their website looking at what SIM-only deals that they have. However, hearing the experiences of others with their network takes the shine off their offer.

EE

From the point of view of network coverage, this operator looks like your best option and would be who I would choose if I had my chance again; there have been parts of Wales and Scotland where I otherwise not have had mobile signal with my O2 account and Vodafone users were left bereft in the case of the Welsh location of Port Eynon. It was a T-Mobile PAYG BlackBerry Curve 8520 that brought me their way in 2010 and the merger with Orange soon showed its advantages when it came to network improvements. A PAYG mobile WiFi modem followed in 2011 and that uses the SIM card from a defunct Huawei mobile broadband dongle. The BlackBerry was traded for cash once a phone upgrade made available an older HTC to replace the thing; it was hideously slow and that may have had more to do with the phone that its 2G data connection. More recently, a backup Moto makes use of a PAYG account and that is how things look for now.

O2

As it happens, I have been with this bunch since they were part of BT and known as Cellnet. The transformation to O2 and subsequent incorporation into Telefonica and Virgin Media has not meant any disruption. Their BT origins and being part of the first wave of operators has meant that network coverage is reasonable too, though voice services do come out better than data ones so that needs to be kept in mind.

Vodafone

For a global operator, their British and Irish networks leave something to be desired and the British one got slated in an industry appraisal. That fits with the pay-as-you-go mobile broadband dongle experience in the U.K. as well as hit and miss attempts calling Vodafone network users in Ireland. Let’s hope that those network problems get sorted because good phones need equally good connections.

Uses for symbolic links

24th April 2007

UNIX (and Linux) does a wonderful trick with its file and folder shortcuts; it effectively treats them as file and folder transporters that transfer associate a file or folder that exists in one folder hierarchy with another and it is treated as if it exists in that hierarchy too. For example, the images folder under /www/htdocs/blog can have a link under /www/htdocs/ that makes it appear that its contents exist in both places without any file duplication. For instance, the pwd command cannot tell a folder from a folder shortcut. To achieve this, I use what are called symbolic links and the following command achieves the outcome in the example:

ln -s /www/htdocs/blog/images /www/htdocs/images

The first file path is the destination for the link while the second one is that for the link itself. I had a problem with Google Reader not showing up images in its feed displays so symbolic links rode to the rescue as they did for resolve a similar conundrum that I was encountering when editing posts in my hillwalking blog.

Taking a camera on a walk…

24th July 2007

On Saturday, I happened to be in Jessops and overheard a salesman emphatically state that you don’t buy a camera for its specifications but for the photos that it produces. While his tone of voice was a touch condescending and he seemed to be putting down a DSLR, he was essentially right. Nevertheless, the specifications do help you get the images and they have to be seen in that light. For instance, having on-board sensor cleaning may save you from having either to clean the thing yourself or send the camera away for the professionals to do the needful, a much safer option in my view. And there may be occasions where image stabilisation is very useful, low light wildlife photography for instance. Yes, there are features that I consider surplus to requirements, like live viewing and movie capture and that is very much due to my buying cameras to make photos. The salesman in question would surely have agreed…

Sunday saw me head to the Lakeland Fells for some walking and a spot of testing of my new Pentax K10D. The details of the walk itself are not for here but for my hillwalking blog and that is where you will find them. While making my way from Crewe to Windermere, I perused the manual looking particularly for information pertaining to functions that I actually use, I should really have done this beforehand, but distractions meant that I hadn’t got around to it. I had to wade through something designed for a new SLR user before I got to what I consider the important stuff. Though this may be a bit irritating, I can understand and accept why they do it this way; we were all new users once and they are hardly likely to want to know about things like aperture priority, raw file capture, ISO control and such like straight away.

What do I think of it then? Let’s start with first impressions. It is definitely smaller than the Canon EOS 10D it accompanies in my possession. That said, it is not too small and there is a decent grip hosting the shutter release button and the camera on/off switch. It also feels well-assembled and reassuringly weighty, an important consideration given that it will see the outdoors a lot. A discussion of the features most relevant to me follows.

On the subject of switching on and off, the camera is set to go into a sleep mode after a second of inactivity but it reawakens quickly when needed, the trigger being half-depression of the shutter release button. In fact, the camera does reawaken much faster than my Canon as it happens and where the delay is a constant source of some irritation. It might sound strange but the on/off switch is also used to activate the depth of field preview, something that no SLR should not have. The location may be unusual, but maybe the designers thought that having shutter release and depth of field preview next to each was a logical way to do it. From a camera operation point of view, there is certainly something to that way of thinking. Behind the shutter release, you’ll find a screen that is a reminder of film SLR’s and it conveys information such as battery life, number of exposures remaining on the card and exposure details (aperture & shutter speed).

Staying on the subject of screens, the one on the back of the camera is larger than that on the Canon. As is customary for these, it allows replay of photos taken and access to the various menus required to control the camera’s operation. In comparison to the Canon, which is essentially a one menu affair with a thumb wheel controlling scrolling and an OK button at its centre to perform operations, the Pentax has a more elaborate system of submenus: one each for recording, playback and set-up. The playback menu is where I found the setting that makes the camera highlight areas of underexposure and overexposure during image playback. This is something that I missed with respect to the Canon until I happened upon it. Camera cleaning is located on the set-up menu and the camera is now set to clean the sensor every time that it is turned on. Why this is not enabled by default is a little beyond me, but the designers might have thought that a vibration from the camera on turning it on could have resulted in a load of support calls. The same submenu also hosts memory card formatting. The recording submenu is where I set the camera to deliver RAW DNG files, an Adobe innovation, rather than the default JPEG’s. There are other options like RAW PEF files, Pentax’s own format, or RAW and JPEG simultaneously, but my choice reflects my workflow in Photoshop Elements; I have yet to stop the said software editing the DNG files, however. With all these options, it is fortunate that there is a navigation wheel whose operation uses arrow buttons to get about. While on the subject of the back screen, there are further settings that are accessed with the FN button rather than the Menu one. These include ISO, white balance, shooting mode (single, continuous, timed and so on) and flash. The only setting that I changed out of this lot was to set the ISO to 400; I prefer to feel that I am in control.

Returning to the camera’s top plate, the exposure mode dial is on the left-hand side, which is no hardship to me as this is in the same place as on the Canon. There are no scene modes, but the available exposure modes are more than sufficient: fully automatic, program, sensitivity priority, shutter priority, aperture priority, shutter and aperture priority, manual, bulb and external flash synchronisation. A few of these need a spot of explaining. Sensitivity priority is no one on me but it is a consequence of the ability of DSLR’s to offer a range of ISO settings; the aperture and the shutter speed are varied according to the ISO setting. Shutter and aperture priority is like manual exposure and is the inverse of sensitivity priority: set both aperture and shutter speed, and the camera will vary the ISO setting. Both of the foregoing assume that you let the camera set the ISO but my setting the thing myself may have put paid to these functions. Shutter priority and aperture priority are, as far as I can tell, their usual selves. For all exposure modes, the thumb wheels at the front and back of the shutter release handgrip set apertures and shutter speeds where appropriate and this arrangement works well.

Mounting on the same column as the exposure dial the metering mode selector and here is where I see more options than my Canon, which has only full and partial multi-segment metering. With the Pentax, you get spot and centre-weighted metering in addition to the default multisegmented variety. Spot metering is definitely very useful but capturing the reading is a multitasking affair: half pressing the shutter button and fulling pressing the AE lock one at the same time. In contrast, Canon’s partial metering is a more convenient single button operation meter and retain facility. Pentax would do well to learn from this.

The focussing mode selector is found on the left of the body next to the lens coupling. I am used to having this on the lenses themselves, so this is a new arrangement for me and one to which I can easily become accustomed. In fact, it is easy to find it while composing a picture. The modes themselves are manual focus, one-time autofocus and continuous autofocus; the last of these is for focussing on moving objects.

I could go further, perhaps overboard, with a discussion of the features of this camera but I draw a line at what’s here. Yes, it is useful to set the focussing point and activate image stabilisation but the above are what matter to me and its performance in the photo making department is the most important aspect. That neatly brings me to my appraisal of how it performs. With inspection of the first few images on the review screen, I was a little disappointed to see how dark the foreground was in comparison to the sky. When I brought everything home as I always do, I found that things weren’t necessarily as they appeared in the field. The Pentax more usefully offers histogram review and highlighting of any areas that are either underexposed or overexposed. It is these functions that I will be using in reshooting decisions while out and about with the Pentax and the same can be said for how I currently use the Canon. In fast changing lighting, the AE lock technique was a bit irritating but I am certain that I will get better at it. The autofocus doesn’t always lock onto the subject, especially in tricky lighting, so manual focussing is a definite necessity and is more useful more for landscape photography, in fact. Nevertheless, the autofocus did do well most of the time and my Sigma lenses have done worse things on me. All in all, I am happy with the K10D and will continue to use it. I have got some decent photos from my excursion and that, as that Jessops salesman would agree, is the main point of a camera.

Work locally, update remotely

4th December 2008

Here’s a trick that might have its uses: using a local WordPress instance to update your online blog (yes, there are plenty of applications that promise to edit your online blog but these need file permissions to the likes of xmlrpc.php to be opened up). Along with the right database access credentials and the ability to log in remotely, adding the following two lines to wp-config.php does the trick:

define('WP_SITEURL', 'http://localhost/blog');

define('WP_HOME', 'http://localhost/blog');

These two constants override what is in the database and allow to update the online database from your own PC using WordPress running on a local web server (Apache or otherwise). One thing to remember here is that both online and offline directory structures are similar. For example, if your online WordPress files are in blog in the root of the online web server file system (typically htdocs for Linux), then they need to be contained in the same directory in the root of the offline server too. Otherwise, things could get confusing and perhaps messy. Another thing to consider is that you are modifying your online blog so the usual rules about care and attention apply, particularly with respect to using the same version of WordPress both locally and remotely. This is especially a concern if you, like me, run development versions of WordPress to see if there are any upheavals ahead of us like the overhaul that is coming in with WordPress 2.7.

An alternative use of this same trick is to keep a local copy of your online database in case of any problems while using a local WordPress instance to work with it. I used to have to edit the database backup directly (on my main Ubuntu system), first with GEdit but then using a sed command like the following:

sed -e s/www\.onlinewebsite\.com/localhost/g backup.sql > backup_l.sql

The -e switch uses regular expression substitution that follows it to edit the input with the output being directed to a new file. It’s slicker than the interactive GEdit route but has been made redundant by defining constants for a local WordPress installation as described above.

All that was needed was a trip to a local shop

5th March 2011

In the end, I did take the plunge and acquired a Sigma 50-200 mm f4-5.6 DC OS HSM lens to fit my ever faithful Pentax K10D. After surveying a few online retailers, I plumped for Park Cameras where the total cost, including delivery, came to something to around £125. This was around £50 less than what others were quoting for the same lens with delivery costs yet to be added. Though the price was good at Park Cameras, I was wondering still about how they could manage to do that sort of deal when others don’t. Interestingly, it appears that the original price of the lens was around £300 but that may have been at launch and prices do seem to tumble after that point in the life of many products of an electrical or electronic nature.

All that was needed was a trip to a local shopUnlike the last lens that I bought from them around two years ago, delivery of this item was a prompt affair with dispatch coming the day after my order and delivery on the morning after that. All in all, that’s the kind of service that I like to get. On opening the box, I was surprised to find that the lens came with a hood but without a cap. However, that was dislodged slightly from my mind when I remembered that I neglected to order a UV or skylight filter to screw into the 55 mm front of it. In the event, it was the lack of a lens cap needed sorting more than the lack of a filter. The result was that I popped in the local branch of Wildings where I found the requisite lens cap for £3.99 and asked about a filter while I was at it. Much to my satisfaction, there was a UV filter that matched my needs in stock though it was that cheap at £18.99 and was made by a company of which I hadn’t heard before, Massa. This was another example of good service when the shop attendant juggled two customers, a gentleman looking at buying a DSLR and myself. While I would not have wanted to disturb another sales interaction, I suppose that my wanting to complete a relatively quick purchase was what got me the attention while the other customer was left to look over a camera, something that I am sure he would have wanted to do anyway. After all, who wouldn’t?

With the extras acquired, I attached them to the front of the lens and carried out a short test (with the cap removed, of course). When it was pointed at an easy subject, the autofocus worked quickly and quietly. A misty hillside had the lens hunting so much that turning to manual focussing was needed a few times to work around something understandable. Like the 18-125 mm Sigma lens that I already had, the manual focussing ring is generously proportioned with a hyperfocal scale on it though some might think the action a little loose. In my experience though, it seems no worse than the 18-125 mm so I can live with it. Both lenses share something else in common in the form of the zoom lens having a stiffer action than the focus ring. However, the zoom lock of the 18-125 mm is replaced by an OS (Optical Stabilisation) one on the 50-200 mm and the latter has no macro facility either, another feature of the shorter lens though it remains one that I cannot ever remember using. In summary, first impressions are good but I plan to continue appraising it. Maybe an outing somewhere tomorrow might offer a good opportunity for using it a little more to get more of a feeling for its performance.

Relocating the Apache web server document root directory in Fedora 12

9th April 2010

So as not to deface anything that is available online on the web, I have a tendency to set up an offline Apache server on a home PC to do any tinkering away from the eyes of the unsuspecting public. Though Ubuntu is my mainstay for home computing, I do have a PC with Fedora installed and I have been trying to get an Apache instance starting automatically on there without success for a few months. While I can start it by running the following command as root, I’d rather not have more manual steps than is necessary.

httpd -k start

The command used by the system when it starts is different and, even when manually run as root, it failed with messages saying that it couldn’t find the directory while the web server files are stored. Here it is:

service httpd start

The default document root location on any Linux distribution that I have seen is /var/www and all is very well with this but it isn’t a safe place to leave things if ever a re-installation is needed. Having needed to wipe /var after having it on a separate disk or partition for the sake of one installation, it doesn’t look so persistent to me. In contrast, you can safeguard /home by having it on another disk or in a dedicated partition and it can be retained even when you change the distro that you’re using. Thus, I have got into the habit of having the root of the web server document root folder in my home area and that is where I have been seeing the problem.

Because of the access message, I tried using chmod and chgrp but to no avail. The remedy has to do with reassigning the security contexts used by SELinux. In Fedora, Apache will not work with the context user_home_t that is usually associated with home directories but needs httpd_sys_content_t instead. To find out what contexts are associated with particular folders, issue the following command:

ls -Z

The final solution was to create a user account whose home directory hosts the root of the web server file system, called www in my case. Then, I executed the following command as root to get things going:

chcon -R -h -t httpd_sys_content_t /home/www

It seems that even the root of the home directory has to have an appropriate security context (/home has home_root_t so that might do the needful too). Without that, nothing will work even if all is well at the next level down. The switches for chcon command translate as follows:

-R : recursive; applies changes to all files and folders within a directory.

-h : changes apply only to symbolic links and not to where they refer in the file system.

-t : alters context type.

It took a while for all of this stuff about SELinux security contexts to percolate through to the point where I was able to solve the problem. A spot of further inspiration was needed too and even guided my search for the information that I needed. It’s well worth trying Linux Home Networking if you need more information. There are references to an earlier release of Fedora but the content still applies to later versions of Fedora right up to the current release if my experience is typical.

  • All the views that you find expressed on here in postings and articles are mine alone and not those of any organisation with which I have any association, through work or otherwise. As regards editorial policy, whatever appears here is entirely of my own choice and not that of any other person or organisation.

  • Please note that everything you find here is copyrighted material. The content may be available to read without charge and without advertising but it is not to be reproduced without attribution. As it happens, a number of the images are sourced from stock libraries like iStockPhoto so they certainly are not for abstraction.

  • With regards to any comments left on the site, I expect them to be civil in tone of voice and reserve the right to reject any that are either inappropriate or irrelevant. Comment review is subject to automated processing as well as manual inspection but whatever is said is the sole responsibility of the individual contributor.